﻿<%@ Page Title="" Language="C#" MasterPageFile="~/admin/Site1.Master" AutoEventWireup="true" CodeBehind="Games.aspx.cs" Inherits="Game_Admin_Demo.admin.Games" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="CSSTableGenerator">
        <asp:ListView ID="ListView1" runat="server" OnSorting="ListView1_Sorting" OnPagePropertiesChanging="ListView1_PagePropertiesChanging" OnItemDataBound="ListView1_ItemDataBound">

            <LayoutTemplate>
                <table>
                    <tr>
                        <th>Name</th>
                        <th>Category</th>
                        <th><asp:LinkButton ID="lbPrice" CommandArgument="PRICE" CommandName="Sort" Text="Price" runat="server" /></th>
                       
                        <th>Quantity</th>

                        <th>Option</th>
                    </tr>
                    <asp:PlaceHolder ID="itemPlaceholder" runat="server"></asp:PlaceHolder>
                </table>
            </LayoutTemplate>
            <ItemTemplate>




                <tr>
                    <td><%# Eval("name") %></td>
                    <td><%# Eval("cat") %></td>
                    <td><%# Eval("price") %></td>
                    <td><%# Eval("quantity") %></td>
                    <td>
                        <asp:HiddenField ID="HiddenField1" Value='<%# Eval("masp") %>' runat="server" />
                        <asp:LinkButton ID="LinkButton1" OnClick="LinkButton1_Click" ForeColor="WhiteSmoke" runat="server">Delete</asp:LinkButton>|
                        <asp:HyperLink ForeColor="GhostWhite" NavigateUrl='<%# "editGame.aspx?id="+Eval("masp") %>' ID="HyperLink1" runat="server">Edit</asp:HyperLink>

                    </td>
                </tr>
            </ItemTemplate>
        </asp:ListView>
        <br />
        <br />
        <asp:DataPager ID="DataPager1" runat="server" PagedControlID="ListView1" PageSize="10">
        
            <Fields>
                <asp:NextPreviousPagerField  ShowFirstPageButton="true" ShowPreviousPageButton="true" ButtonType="Button" ShowNextPageButton="false" ShowLastPageButton="false"/>
                <asp:NumericPagerField ButtonType="Button" />
               <asp:NextPreviousPagerField  ShowFirstPageButton="false" ButtonType="Button" ShowPreviousPageButton="false" ShowNextPageButton="true" ShowLastPageButton="true" />
            </Fields>
    </asp:DataPager>
        <br />
        <br />
         <asp:HyperLink ID="HyperLink1" NavigateUrl="createGame.aspx" runat="server">Create</asp:HyperLink>
    </div>
    
</asp:Content>
